package cc.wsyw126.java.nowcoder.sword_offer;

/**
 * Created by dp on 17/3/28.
 */
public class ReOrderArray {
    public void reOrderArray(int[] array) {
        int odd = array.length - 1, even = array.length - 1;
        for (int i = array.length - 1; i >= 0; i--) {
            if (array[i] %2 == 0) {
                if (i < odd) {
                    int temp = array[odd];
                    array[odd] = array[i];
                    array[i] = temp;
                    odd = i;
                }

                // TODO: 17/3/28 没有写完
            }
        }
    }
}
